import request from '@/utils/request';

export async function query() {
  return request('/api/users');
}
// 添加平台会员用户帐号
export async function addUser(params) {
  return request(`/lgjserve/users`, {
    method:'post',
    data:params,
    headers: {
      Authorization: sessionStorage.token,
    },
  });
}
// 自己写的
export async function queryUsersList(params) {
  return request(`/lgjserve/admin/getUsers?page=${params.currentPage}`, {
    headers: {
      Authorization: sessionStorage.token,
    },
  });
}
// 自己写的
export async function queryWxUsersList(params) {
  return request(`/lgjserve/admin/getWxUsers?page=${params.currentPage}`, {
    headers: {
      Authorization: sessionStorage.token,
    },
  });
}

// 冻结用户
export async function handleAccount(params) {
  return request('/lgjserve/admin/delete', {
    method: 'post',
    data: params,
  });
}
// 获取用户详情
export async function queryUserinfo(params) {
  return request(`/lgjserve/admin/userinfo/${params}`, {
    headers: {
      Authorization: sessionStorage.token,
    },
  });
}
